#include "startwindow.h"
#include "ui_startwindow.h"
#include "mainwindow.h"
#include "ui_mainwindow.h"

StartWindow::StartWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::StartWindow)
{
    ui->setupUi(this);
}

StartWindow::~StartWindow()
{
    delete ui;
}

void StartWindow::on_pushButton_clicked()
{

    MainWindow* w = new MainWindow();
    w->show();
    w->typem();
    w->game->gameStatus = PLAYING;
    w->initGame();
    this->close();
}

void StartWindow::on_pushButton_2_clicked()
{
    MainWindow* w = new MainWindow();
    w->show();
    w->typea();
    w->game->gameStatus = PLAYING;
    w->initGame();
    this->close();
}

void StartWindow::on_pushButton_3_clicked()
{
    MainWindow* w = new MainWindow();
    w->show();
    w->typen();
    w->game->gameStatus = PLAYING;
    w->initGame();
    this->close();
}

void StartWindow::on_pushButton_4_clicked()
{
    MainWindow* w = new MainWindow();
    w->show();
    w->typew();
    w->game->gameStatus = PLAYING;
    w->initGame();
    this->close();
}

